<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>journal - ClueLib</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="journal"></a>journal</h1><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual class journal</td></tr></table></blockquote><p><span class="virtual">virtual</span> Provides logging functions to store transactions to a log or a CSV file.</p><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#journal" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">journal</a></td><td class=SDescription><span class="virtual">virtual</span> Provides logging functions to store transactions to a log or a CSV file.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#journal.Properties" >Properties</a></td><td class=SDescription></td></tr><tr class="SProperty SIndent2 SMarked"><td class=SEntry><a href="#journal.log_fd" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">log_fd</a></td><td class=SDescription>The file descriptor for the log. </td></tr><tr class="SProperty SIndent2"><td class=SEntry><a href="#journal.csv_fd" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">csv_fd</a></td><td class=SDescription>The file descriptor for the CSV file. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#journal.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#journal.log" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">log</a></td><td class=SDescription><span class="static">static</span> Stores a transaction to the file specified by the <b>log_fd</b> using the format shown in the Example below. </td></tr><tr class="SFunction SIndent2"><td class=SEntry><a href="#journal.csv" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">csv</a></td><td class=SDescription><span class="static">static</span> Stores a transaction to the file specified by the <b>csv_fd</b> using the CSV (comma separated value) format shown in the Example below. </td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="journal.Properties"></a>Properties</h3></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="journal.log_fd"></a>log_fd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">static integer log_fd</td></tr></table></blockquote><p>The file descriptor for the log.&nbsp; It is user&rsquo;s responsibility to open the file before calling <b>log</b>.</p></div></div></div>

<div class="CProperty"><div class=CTopic><h3 class=CTitle><a name="journal.csv_fd"></a>csv_fd</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">static integer csv_fd</td></tr></table></blockquote><p>The file descriptor for the CSV file.&nbsp; It is user&rsquo;s responsibility to open the file before calling <b>csv</b>.</p></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="journal.Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="journal.log"></a>log</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void log(</td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>desc,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>from_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> &quot;journal&quot;,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>to_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> from_unit</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p><span class="static">static</span> Stores a transaction to the file specified by the <b>log_fd</b> using the format shown in the Example below.&nbsp; It is user&rsquo;s responsibility to open the log file before calling this function.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>desc</td><td class=CDLDescription>The description of a transaction.</td></tr><tr><td class=CDLEntry>from_unit</td><td class=CDLDescription><span class="optional">optional</span> The name of the unit the transaction comes from.&nbsp; The default name is &ldquo;<b>journal</b>&rdquo;.</td></tr><tr><td class=CDLEntry>to_unit</td><td class=CDLDescription><span class="optional">optional</span> The name of the unit the transaction goes to.&nbsp; The default name is the value of <b>from_unit</b>.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">journal::log_fd = $fopen( &quot;journal.log&quot;, &quot;w&quot; );
journal::log( &quot;request&quot;, &quot;master&quot;, &quot;slave&quot; );
#100;
journal::log( &quot;response&quot;, &quot;slave&quot;, &quot;master&quot; );

/* journal.log */
// master-&gt;slave: @0 request
// slave-&gt;master: @100 response</pre></blockquote></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="journal.csv"></a>csv</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void csv(</td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>desc,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>from_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> &quot;journal&quot;,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>to_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> from_unit</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p><span class="static">static</span> Stores a transaction to the file specified by the <b>csv_fd</b> using the CSV (comma separated value) format shown in the Example below.&nbsp; It is user&rsquo;s responsibility to open the CSV file before calling this function.</p><h4 class=CHeading>Arguments</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>desc</td><td class=CDLDescription>The description of a transaction.</td></tr><tr><td class=CDLEntry>from_unit</td><td class=CDLDescription><span class="optional">optional</span> The name of the unit the transaction comes from.&nbsp; The default name is &ldquo;<b>journal</b>&rdquo;.</td></tr><tr><td class=CDLEntry>to_unit</td><td class=CDLDescription><span class="optional">optional</span> The name of the unit the transaction goes to.&nbsp; The default name is the value of <b>from_unit</b>.</td></tr></table><h4 class=CHeading>Example</h4><blockquote><pre class="prettyprint">journal::csv_fd = $fopen( &quot;journal.csv&quot;, &quot;w&quot; );
journal::csv( &quot;request&quot;, &quot;master&quot;, &quot;slave&quot; );
#100;
journal::csv( &quot;response&quot;, &quot;slave&quot;, &quot;master&quot; );

/* journal.csv */
// &quot;master&quot;,&quot;slave&quot;,&quot;@0 request&quot;
// &quot;slave&quot;,&quot;master&quot;,&quot;@100 response&quot;</pre></blockquote></div></div></div>

</div><!--Content-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CClass><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">virtual class journal</td></tr></table></blockquote><span class="virtual">virtual</span> Provides logging functions to store transactions to a log or a CSV file.</div></div><div class=CToolTip id="tt2"><div class=CProperty><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">static integer log_fd</td></tr></table></blockquote>The file descriptor for the log. </div></div><div class=CToolTip id="tt3"><div class=CProperty><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">static integer csv_fd</td></tr></table></blockquote>The file descriptor for the CSV file. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void log(</td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>desc,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>from_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> &quot;journal&quot;,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>to_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> from_unit</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><span class="static">static</span> Stores a transaction to the file specified by the <b>log_fd</b> using the format shown in the Example below. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>static function void csv(</td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>desc,</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%></td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>from_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> &quot;journal&quot;,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>string&nbsp;</td><td class="PParameter  prettyprint " nowrap>to_unit</td><td class="PDefaultValuePrefix  prettyprint ">&nbsp;=&nbsp;</td><td class="PDefaultValue  prettyprint " width=100%> from_unit</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><span class="static">static</span> Stores a transaction to the file specified by the <b>csv_fd</b> using the CSV (comma separated value) format shown in the Example below. </div></div><!--END_ND_TOOLTIPS-->

<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>